package cyy;
//1998~2008
public class Hzt04 {
	public static void main(String[] args) {
		int a=1998;
        while (a<=2008) {
			if (a%4==0 || a%400==0) {
				System.out.println(a);
			}
			a++;
		}
        System.out.println("");
	}

}